<!DOCTYPE html>
<html>
<head>
	<base id="base" href="${request.contextPath}">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>问题反馈</title>
	<link href="/css/bootstrap.min.css" rel="stylesheet"/>
	<link href="/css/bootstrap-theme.min.css" rel="stylesheet"/>
	<link href="images/img/favicon.ico" type="image/x-icon" rel="icon">
	<link href="images/img/iTunesArtwork_402x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
</head>
<body>
<div class="aui-container">
	<form>
		<div id="openId" style="display: none">${openId}</div>
		<div id="nickname" style="display: none">${nickname}</div>
		<textarea id="feedback" style="width: 100%; height: 150px; border-radius: 6px;" placeholder="请描述您的问题"></textarea>
	</form>
	<button class="btn btn-primary btn-bloc" style="width:100%" onclick='submit()'>提交</button>
</div>

<script src="/js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="/js/bootstrap.min.js"></script>
<script >
    var base = $("#base").attr("href");
    var openId = $("#openId").text().trim();
    var nickname = $('#nickname').text().trim();
    function submit(){
        var feedback = $('#feedback').val();
        $.ajax({
            type: "POST",
            url: base+'/feedback',
			data: {
              	"feedback":feedback,
				"openId": openId,
				"nickname": nickname
			},
            dataType:'json',

            success: function(result){
				alert(result);
            },
            error:function(){
                alert(openId + '|'+ nickname + '|' + feedback);
            },
        });
	}
</script>
</body>

</html>